package design.pattern.策略模式;

public class Test {

    public static void main(String[] args){
        Context c1 = new Context(CashTypeEnum.CASH_NORMAL);
        double d1 = c1.getResult(300);

        Context c2 = new Context(CashTypeEnum.CASH_REBATE);
        double d2 = c2.getResult(300);

        Context c3 = new Context(CashTypeEnum.CASH_RETURN);
        double d3 = c3.getResult(300);

        System.out.println(d1 + "\n" + d2 + "\n" + d3);
    }
}
